package com.sifang.controller;

import com.sifang.domain.Result;
import com.sifang.domain.Sort;
import com.sifang.service.ISortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sort")
public class SortController {

    @Autowired
    private ISortService iSortService;

    //获取分类列表
    @GetMapping
    public Result<List<Sort>> list(){
        List<Sort> ss = iSortService.list();
        return Result.success(ss);
    }
}
